package com.lrs.java.j2se_self.collectionReview;

public class CompanyName {
	private String firstName,lastName;
	
	public CompanyName(String fname,String lname){
		this.firstName = fname;
		this.lastName = lname;
	}
	public String returnName(){
		return this.firstName;
	}
	public String returnLName(){
		return this.lastName;
	}
	public String toString(){
		return this.firstName+" "+this.lastName ;
	}
	/*
	public boolean equals(Object name){
		if(name instanceof CompanyName){
			CompanyName c = (CompanyName)name;
			return (firstName.equals(c.firstName))&&(lastName.equals(c.lastName));
		}
		return super.equals(name);
	}
	public int hashCode(){
		return firstName.hashCode();
	}
	*/
	public static void main(String[] args){
		CompanyName man = new CompanyName("l","z");
		System.out.println(man);
	}
}
